﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

namespace QuTouTiaoAssist.Entity
{
    /// <summary>
    /// 新手任务信息
    /// </summary>
    class QttFresherMissionInfo
    {
        /// <summary>
        /// 日常任务列表
        /// </summary>
        [JsonProperty("daily")]
        public List<QttMissionInfo> Daily = new List<QttMissionInfo>();

        /// <summary>
        /// 一次性任务列表
        /// </summary>
        [JsonProperty("once")]
        public List<QttMissionInfo> Once = new List<QttMissionInfo>();

        /// <summary>
        /// 签到状态
        /// </summary>
        [JsonProperty("signIn")]
        public QttSignInStatus SignIn = new QttSignInStatus();

        /// <summary>
        /// 开宝箱状态
        /// </summary>
        [JsonProperty("treasureBox")]
        public QttTreasureBoxStatus TreasureBox = new QttTreasureBoxStatus();
    }

    class QttMissionInfo
    {
        /// <summary>
        /// 任务名称
        /// </summary>
        [JsonProperty("name")]
        public string Name;

        /// <summary>
        /// 任务奖励金币
        /// </summary>
        [JsonProperty("amount")]
        public int Amount;

        /// <summary>
        /// 任务数限制
        /// </summary>
        [JsonProperty("limit")]
        public int Limit;

        [JsonProperty("action")]
        public string Action;

        /// <summary>
        /// 描述
        /// </summary>
        [JsonProperty("desc")]
        public string Desc;

        /// <summary>
        /// 最大金币奖励
        /// </summary>
        [JsonProperty("max_reward")]
        public int MaxReward;

        [JsonProperty("count")]
        public int Count;
    }

    class QttSignInStatus
    {
        /// <summary>
        /// 连续签到天数
        /// </summary>
        [JsonProperty("continuation")]
        public int Continuation;

        /// <summary>
        /// 今天是否已经签到
        /// </summary>
        [JsonProperty("today")]
        public bool Today;
    }

    class QttTreasureBoxStatus
    {
        /// <summary>
        /// 是否可以开宝箱
        /// </summary>
        [JsonProperty("isActive")]
        public bool IsActive;

        [JsonProperty("name")]
        public string Name;

        /// <summary>
        /// 描述
        /// </summary>
        [JsonProperty("desc")]
        public string Desc;

        [JsonProperty("isReceived")]
        public bool IsReceived;

        /// <summary>
        /// 下次宝箱时间，为null时，表示开宝箱了
        /// </summary>
        [JsonProperty("next")]
        public long? Next;
    }
}
